package net.lab1024.sa.admin.module.business.order.domain.form;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.swagger.v3.oas.annotations.media.Schema;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import lombok.Data;
import net.lab1024.sa.admin.module.business.order.constant.OrdersStatusEnum;
import net.lab1024.sa.base.common.json.deserializer.FileKeyVoDeserializer;
import net.lab1024.sa.base.common.json.serializer.FileKeyVoSerializer;
import net.lab1024.sa.base.common.swagger.SchemaEnum;
import net.lab1024.sa.base.common.validator.enumeration.CheckEnum;

/**
 * 订单 新建表单
 *
 * @Author syf
 * @Date 2025-05-16 10:02:50
 * @Copyright 畅想科技
 */

@Data
public class OrderAddForm {

    @SchemaEnum(OrdersStatusEnum.class)
    @CheckEnum(message = "订单类型", value = OrdersStatusEnum.class, required = false)
    private Integer orderKind;

//    @Schema(description = "订单类型：0:代取快递;1:代买物品;2:代拿外卖;3:代办事", requiredMode = Schema.RequiredMode.REQUIRED)
//    @NotNull(message = "订单类型：0:代取快递;1:代买物品;2:代拿外卖;3:代办事 不能为空")
//    private Long orderKind;
    @Schema(description = "订单状态：", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long orderState;
    @Schema(description = "订单起点：取货地点", requiredMode = Schema.RequiredMode.REQUIRED)
//    @NotNull(message = "订单起点：取货地点 不能为空")
    private Long orderStart;
    @Schema(description = "订单图片")
    @JsonSerialize(using = FileKeyVoSerializer.class)
    @JsonDeserialize(using = FileKeyVoDeserializer.class)
    private String orderPic;
    @Schema(description = "订单终点：配送地址", requiredMode = Schema.RequiredMode.REQUIRED)
//    @NotNull(message = "订单终点：配送地址 不能为空")
    private Long orderEnd;
    private String orderContent;
    private String orderNum;
    @Schema(description = "订单截止时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime deadTime;

    @Schema(description = "订单金额", requiredMode = Schema.RequiredMode.REQUIRED)
    private BigDecimal orderPrice;

    @Schema(description = "备注内容", requiredMode = Schema.RequiredMode.REQUIRED)
    private String reMark;

    @Schema(description = "订单创建人", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long userId;

}